package day13;

import java.util.concurrent.TimeUnit;

public class InterruptDemo {

    public static void main(String[] args) throws InterruptedException {

        Thread thread = new Thread(() -> {
            try {
                TimeUnit.SECONDS.sleep(6);
            } catch (InterruptedException e) {
                System.out.println("ho ho:" + e.getMessage());
            }
        });

        thread.start();

        TimeUnit.SECONDS.sleep(2);

        thread.interrupt();
    }

}
